xen/console: Add support for early printk
authorJulien Grall <julien.grall@linaro.org>
Thu, 13 Mar 2014 15:09:17 +0000 (15:09 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 1 Apr 2014 10:30:33 +0000 (11:30 +0100)
commit6d9abc3f33329e49e96381ef016ac6db839bf682
treebe4c5eb2440c1ec266e94dbe968ce02d7ad86408
parent2b69209a3069d1100947717268b5fb0894b7ad82
xen/console: Add support for early printk

On ARM, a function (early_printk) was introduced to output message when the
serial port is not initialized.

This solution is fragile because the developper needs to know when the serial
port is initialized, to use either early_printk or printk. Moreover some
functions (mainly in common code), only use printk. This will result to a loss
of message sometimes.

Directly call early_printk in console code when the serial port is not yet
initialized. For this purpose use serial_steal_fn.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/arm/early_printk.c
xen/drivers/char/console.c
xen/include/asm-arm/early_printk.h
xen/include/xen/early_printk.h [new file with mode: 0644]